package com.example.patient.jpa;

import com.example.common.entity.DoctorNotice;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface DoctorNoticeRepository extends JpaRepository<DoctorNotice, Long> {

    
    @Query(value = "select * from doctor_notice where dc_id_bigint = ?1 order by create_time_datetime desc limit 1",nativeQuery = true)
    DoctorNotice findTopByDcIdOrderByCreateTimeDesc(Long doctorId);
    
}
